import request from "@/request/request";
import qs from "qs"

 
export function getResourceTypeList(data){
    let url = "/admin/resourceType";
    let param = {
        url:url,
        method:"GET",
        params:data
    }
    return request(param);
}



export function saveResourceType(id,resourceType){
    let method = "post";
    let url = "/admin/resourceType";
    if(id){
        method = "put";
        url = "/admin/resourceType/"+id;
    }

    let param = {
        url:url,
        method:method,
        data:qs.stringify(resourceType)
    }
    return request(param);
}


export function deleteResourceTypeById(id){
    let param = {
        url:"/admin/resourceType/"+id,
        method:"delete"
    }
    return request(param);
}
 





